﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Include/Admin.master" AutoEventWireup="true"
    CodeFile="Manage.aspx.cs" Inherits="Admin_Bulletin_Manage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="../../Style/DatePage.css" rel="stylesheet" type="text/css" />
     <link href="../../Scripts/jquery-easyui-1.3.1/themes/default/easyui.css" rel="stylesheet"
        type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div style="width: 1024px">
        <table class="editTable" align="center" style="width: 100%" cellspacing="1" cellpadding="0px">
            <tr>
                <th colspan="5">
                    购物公告列表
                </th>
            </tr>
            <tr>
                <th>
                    发布时间
                </th>
                <td>
                    <asp:TextBox ID="txtTimeFrom"  CssClass="easyui-datebox" runat="server"></asp:TextBox>至
                    <asp:TextBox ID="txtTimeTo"  CssClass="easyui-datebox" runat="server"></asp:TextBox>
                </td>
                <th>
                    关键字
                </th>
                <td>
                    <asp:TextBox ID="txtGuanJianZi" runat="server" Width="163px"></asp:TextBox>
                </td>
                <td>
                    <asp:Button ID="btnSouSuo" runat="server" Text="搜索" OnClick="btnSouSuo_Click" />
                </td>
            </tr>
        </table>
        <br />
        <h4>
            <a href="Add.aspx">添加购物公告</a>
        </h4>
        <asp:ListView ID="lvGongGaoList" runat="server" DataKeyNames="ID" OnItemDeleting="lvGongGaoList_ItemDeleting"
            OnPagePropertiesChanged="lvGongGaoList_PagePropertiesChanged">
            <LayoutTemplate>
                <table width="100%" class="editTable" cellspacing="1" cellpadding="0px">
                    <tr>
                        <th>
                            标题
                        </th>
                        <th>
                            公告内容
                        </th>
                        <th>
                            发布时间
                        </th>
                        <th>
                            操作
                        </th>
                    </tr>
                    <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                </table>
            </LayoutTemplate>
            <ItemTemplate>
                <tr>
                    <td>
                        <%#DongDong.Common.Misc.MaxCharacters(DongDong.Common.Misc.ClearHtml(Eval("Title")), 20)%>
                    </td>
                    <td style='width: 400px'>
                        <div style="width: 400px; height: 100px; overflow: scroll">
                            <%#(Eval("Detail"))%></div>
                    </td>
                    <td>
                        <%#Eval("AddTime")%>
                    </td>
                    <td>
                        <a href="AddSYBulletin.aspx?BulletinID=<%#Eval("ID")%>">修改</a>
                        <asp:LinkButton ID="lbtnDelete" runat="server" Text="删除" OnClientClick="return confirm('您是否确定删除?');"
                            CommandName="Delete" CommandArgument='<%#Eval("ID")%>'></asp:LinkButton>
                    </td>
                </tr>
            </ItemTemplate>
            <EmptyDataTemplate>
                <div>
                    --没有数据--
                </div>
            </EmptyDataTemplate>
        </asp:ListView>
        <div style="padding: 4px; text-align: center;">
            <asp:DataPager ID="DataPager1" runat="server" OnPreRender="Pager_PreRender" PagedControlID="lvGongGaoList"
                PageSize="16">
                <Fields>
                    <asp:TemplatePagerField>
                        <PagerTemplate>
                            共<%=DataPager1.TotalRowCount%>条数据
                        </PagerTemplate>
                    </asp:TemplatePagerField>
                    <asp:NextPreviousPagerField ShowFirstPageButton="true" ShowLastPageButton="true" />
                    <asp:NumericPagerField ButtonCount="5" CurrentPageLabelCssClass="CurrentPage" NumericButtonCssClass="Page" />
                </Fields>
            </asp:DataPager>
        </div>
    </div>
     <script src="../../Scripts/jquery-easyui-1.3.1/jquery.easyui.min.js" type="text/javascript"></script>
</asp:Content>
